<template>
	<view>
		<view v-if="list.length<1" class="nogoods">
			<image src="../../static/center/not-records.png" mode="widthFix" class="norecord"></image>
			<view>没有待返记录</view>
		</view>
		<view v-if="list.length>0">
			<view class="order-box" v-for="(item,i) in list" :key="item.index">
				<view class="box-b" style="display:flex;">
					<image src="../../static/center/tuihuan.png" style="height: 20px;width: 20px;margin-top: 12rpx;">
					<view class = "info">
						<view class="number">{{item.goodsName}}</view> 
						<view class="time" style="font-size: 13px;">{{item.time}}</view> 
					</view> 
					<view class = "ways">
						<view style="margin-bottom:7px;margin-top: 3px;">待返积分</view>
						<view >{{(item.gPrice - (item.gPrice/item.day)*item.hasFanhuan).toFixed(2)}}</view> 
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[	]		// 待返记录
			}
		},
		onLoad() {
			this.getDaifanRecord()
		},
		methods: {
			//请求待返记录
			getDaifanRecord(){
				this.$http.get('/tuihuan/historyxcx',{
					userid:uni.getStorageSync('usersId')
				}).then(res => {
					// console.log(res.data)
					this.list = res.data.data;
				})
			}
		}
	}
</script>

<style scoped>
	.nogoods{
		margin-top: 200rpx;
		text-align: center;
	}
	.norecord{
		width: 100rpx;
	}
	.time,.ways{
		font-size: 14px;
		color: #909399;
	}
	.order-box{
		padding: 30rpx 0 30rpx 30rpx;
		border-bottom: 1px #d1d1d1 solid;
		background-color: white;
	}
	#houtai {
		background-image: url(${pageContext.request.contextPath}/weixin/img/center/dianpu.png);
	}
	.info {
		float: left;
		width: 160px;
		margin-left: 20px;
	}
	.number {
		font-size: 20px;
		color: #FF6700;
		margin-bottom: 5px;
	}
	.time {
		font-size: 14px;
	}
	.ways {
		float: left;
		margin-left: 20px;
	}
	.nav-header h1 {
		text-align: left;
	}
	.nav-header a {
		color: white;
	}
</style>
